﻿using System;

namespace Arrays1D
{
    class Program
    {
        static void Main(string[] args)
        {
            int s = 0;
            long p = 1;
            int current;

            for (int i = 0; i < 5; i++)
            {
                current = int.Parse(Console.ReadLine());
                s += current;
                p *= current;
            }

            Console.WriteLine(s);
            Console.WriteLine(p);

            s = 0;
            p = 1;

            int n = 5;
            int[] y = new int[n];

            for (int i = 0; i < n; i++)
            {
                y[i] = int.Parse(Console.ReadLine());
                s += y[i];
                p *= y[i];
            }

            Console.WriteLine(s);
            Console.WriteLine(p);

            for (int i = 0; i < n; i++)
            {
                Console.Write(y[i] + ", ");
            }

            Console.ReadKey();
        }
    }
}
